<%@page import="com.polytech.model.Topic"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <meta charset="utf-8">
    <title>
       IRM 2015
    </title>
 
    <link href="/irm-forum/views/css/css.css" rel="stylesheet">
    <link href="/irm-forum/views/css/main.css" rel="stylesheet">
  </head>
  <body>
	<jsp:include page="layout/header.jsp"/>
    <div class="wrapper">
      <div class="content">
            <h1 style="text-align: center;">
              Bienvenue dans le FORUM des IRM  !
            </h1>
      </div>

      <div class="compact">
        <ul class="topics">
        <% List<Topic> listTopics=(List<Topic>)request.getAttribute("listTopics"); %>
        <% if(listTopics!=null){
        	for(Topic topic:listTopics){ %>
          <li class="topic">
          <a href="/irm-forum/forum/show-topic.action?id=<%=topic.getId()%>" style="display: block;">
            <div class="ss"> <%=topic.getText()%> </div>
            <h2 style="position: relative; border-top:1px solid #BBBBBB;padding-top:4px; ">
            	<span style="position:absolute;left:10px;margin-right:10px;">par :<%=topic.getCreator().getLogin()%></span>
                <span> <%=topic.getSubject()%> </span>
            </h2>
           </a> 
          </li>
          <%}%>
        </ul>
        <p class="extra-instructions">
		        <a href="/irm-forum/forum/list-topics.action">afficher tous les publications</a>   
        </p>
        <%}%>
      </div>
    </div>
   <jsp:include page="/views/layout/footer.jsp"></jsp:include>
</body></html>